package com.hspedu.reader_;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 * @author LiuJinTao
 * @className BufferedReader_
 * @date 2024/06/27 23:54
 * @description TODO
 */
public class BufferedReader_ {
    public static void main(String[] args) throws IOException {
        String path = "e:\\a.txt";

        // 创建 BUfferedReader 对象
        BufferedReader bufferedReader = new BufferedReader(new FileReader(path));

        // 读取
        String line;// 按行读取
        while ((line = bufferedReader.readLine()) != null) {
            System.out.println(line);
        }
        bufferedReader.close();
    }
}
